package me.boot.common.constant;

/**
 * @Description:
 * @author: Sylar
 * @date: 2021年09月27日 11:10 上午
 */
public interface DbConst {

    //@formatter:off
    Long PAGE_MAX_LIMIT = 1000L;

    //公共实体 START
    String PROPERTY_ID = "id";
    String PROPERTY_CREATER = "creater";
    String PROPERTY_UPDATER = "updater";
    String PROPERTY_OWNER = "owner";

//    String PROPERTY_CREATE_BY = "createBy";
//    String PROPERTY_CREATE_TIME = "createTime";
//    String PROPERTY_UPDATE_BY = "updateBy";
//    String PROPERTY_UPDATE_TIME = "updateTime";
    String PROPERTY_VERSION = "version";
    String PROPERTY_DELETED = "deleted";
    String PROPERTY_INVALID = "invalid";
    String PROPERTY_EXTRA = "extra";
    String PROPERTY_COMMENTS = "comments";

    String COLUMN_ID = PROPERTY_ID;
    String COLUMN_CREATER = PROPERTY_CREATER;
    String COLUMN_UPDATER = PROPERTY_UPDATER;
    String COLUMN_OWNER = PROPERTY_OWNER;

//    String COLUMN_CREATE_BY = "create_by";
//    String COLUMN_CREATE_TIME = "create_time";
//    String COLUMN_UPDATE_BY = "update_by";
//    String COLUMN_UPDATE_TIME = "update_time";
    String COLUMN_VERSION = PROPERTY_VERSION;
    String COLUMN_DELETED = PROPERTY_DELETED;
    String COLUMN_INVALID = PROPERTY_INVALID;
    String COLUMN_EXTRA = PROPERTY_EXTRA;
    String COLUMN_COMMENTS = PROPERTY_COMMENTS;
    //公共实体 END

    //公共业务实体 START
    String PROPERTY_TENANT_ID = "tenantId";
    String PROPERTY_COMPANY_ID = "companyId";
    String PROPERTY_DEPARTMENT_ID = "departmentId";
    String PROPERTY_USER_ID = "userId";

    String COLUMN_TENANT_ID = "tenant_id";
    String COLUMN_COMPANY_ID = "company_id";
    String COLUMN_DEPARTMENT_ID = "department_id";
    String COLUMN_USER_ID = "user_id";
    //公共业务实体 END

    //租户相关 START
    //全局租户表
    String TENANT_TABLE_NAME = "sys_tenant";
    //租户数据源配置
    String TENANT_DATASOURCE_COLUMN_NAME = "ds_config";
    String TENANT_DATASOURCE_TABLE_NAME = "tenant_datasource";

    //租户模式=COLUMN 时，业务表中的租户标识
    String TENANT_ID_PROPERTY = PROPERTY_TENANT_ID;
    String TENANT_ID_COLUMN = COLUMN_TENANT_ID;

    //租户模式=SCHEMA 时，租户schema 命名格式: {prefix}_{tenantId}
    String TENANT_SCHEMA_PREFIX = "tenant";
    //租户相关 END

    //组织用户角色权限 START
    String ORG_ID_COLUMN = "org_id";
    String USER_ID_COLUMN = "user_id";
    String ROLE_ID_COLUMN = "role_id";
    String PERMISSON_ID_COLUMN = "permisson_id";
    //组织用户角色权限 END




    //@formatter:on
}
